package com.efrei.uchat.client.model;

import java.util.ArrayList;
import java.util.List;

public class Croom {

	private String topic;
	private String password;
	private boolean isPrivate = false;
	private List<String> chatters = new ArrayList<String>();
	private List<Message> messages = new ArrayList<Message>();
	
	public Croom(String topic, boolean isPrivate) {
		this.topic = topic;
		this.isPrivate = isPrivate;
	}
	
	public void addChatter(String chatter) {
		chatters.add(chatter);
	}
	
	public void addMessage(Message message) {
		messages.add(message);
	}
	
	@Override
	public String toString() {
		return topic;
	}
	
	public String getTopic() {
		return topic;
	}
	
	public boolean isPrivate() {
		return isPrivate;
	}
	
	public void setPrivate(boolean isPrivate) {
		this.isPrivate = isPrivate;
	}
	
	public List<Message> getMessages() {
		return messages;
	}
	
	public void setMessages(List<Message> messages) {
		this.messages = messages;
	}

	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
}
